import { computed } from 'vue'
import { type BwPriceAskWords, FailtureCodeEnum } from '@/services/price-sheet/getBwPriceAskWords'

export function usePriceDisable(bwPriceInfo: BwPriceAskWords) {
  const { DisablePC, DisableMobile, DisablePlatform } = FailtureCodeEnum
  const pcDisable = computed(() => {
    return [DisablePC, DisablePlatform].includes(bwPriceInfo.failtureCode!)
  })

  const mobileDisable = computed(() => {
    return [DisableMobile, DisablePlatform].includes(bwPriceInfo.failtureCode!)
  })

  return {
    pcDisable,
    mobileDisable
  }
}
